<?php
namespace Open\Pages;
/**
 * Description of Page
 *
 * @author nofear
 */
class Gallery extends Page {
    
    public function index($key) {
        $this->view = new \System\Template('@open\gallery.twig');
        $Page       = $this->getCurrentPage($key);
        $repository = $this->EntityManager->getRepository('Shared\Main\SiteObject');

        $this->view->Page         = $Page;
        $this->view->galleryItems = $repository->getAllPictures($Page);
    }
}
